﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Services.OpenIDHost;
namespace Services
{
    class ConnectHostService
    {
        static OpenIDServiceClient host;
        public static OpenIDServiceClient Prodiver()
        {
            try
            {
                if (host == null || host.State == System.ServiceModel.CommunicationState.Closed || host.State == System.ServiceModel.CommunicationState.Faulted)
                {
                    host = new OpenIDServiceClient();
                    host.Open();
                }
                return host;
            }
            catch
            {
                return null;
            }
        }
    }
}
